package com.nq.controller.protol;


import com.nq.common.ServerResponse;
import com.nq.pojo.UserBank;
import com.nq.pojo.UserUsdt;
import com.nq.service.IUserBankService;
import com.nq.service.IUserUsdtService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping({"/user/usdt/"})
public class UserUsdtController {
    private static final Logger log = LoggerFactory.getLogger(UserUsdtController.class);

    @Autowired
    IUserUsdtService userUsdtService;

    /**
     * 绑定 usdt
     * @param usdt
     * @param request
     * @return
     */
    @RequestMapping({"add.do"})
    @ResponseBody
    public ServerResponse add(UserUsdt usdt, HttpServletRequest request) {
        return this.userUsdtService.addUsdt(usdt, request);
    }

    /**
     * 修改 usdt 信息
     * @param usdt
     * @param request
     * @return
     */
    @RequestMapping({"update.do"})
    @ResponseBody
    public ServerResponse update(UserUsdt usdt, HttpServletRequest request) {
        return this.userUsdtService.updateUsdt(usdt, request);
    }

    /**
     * 查询用户 usdt 信息
     * @param request
     * @return
     */
    @RequestMapping({"getUsdtInfo.do"})
    @ResponseBody
    public ServerResponse getUsdtInfo(HttpServletRequest request) {
        return this.userUsdtService.getUsdtInfo(request);
    }

}
